$('.swiper-wrapper').html('')
var oHTml='';
$('.showImg li img').each(function(){
    oHTml+='<div class="swiper-slide"><img src="'+$(this).attr('src')+'"></div>'
})

$('.swiper-wrapper').html(oHTml)
var mySwiper = new Swiper('.swiper-container',{
		initialSlide:0,
		pagination : '.swiper-pagination',
		paginationType : 'fraction',
		observer:true,
		observeParents:true
	  	}); 

$('.showImg li img').on('click',function(){
    $('.x-position').show()
		var oIndex=$(this).index();
		mySwiper.params.initialSlide=oIndex;
		mySwiper.init();

})
$('.x-position').on('click',function(){
    $(this).hide()
})